import { createRouter, createWebHashHistory } from 'vue-router'
import Play from '@/views/Playground'

const Layout = () => import('@/views/Layout')
const Home = () => import('@/views/Home/index')
const TopCategory = () => import('@/views/Category/index')// 面包屑 跳转路由

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '/',
        component: Home
      },
      {
        path: '/category/:id',
        component: TopCategory
      }
    ]
  },
  {
    path: '/play',
    component: Play
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
